<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{/client/header::header-head}">
    <style>
        .table tr td {
            border: 1px solid white;
        }
    </style>
</head>
<body>
<div th:replace="~{/client/header::header-body}"></div>

<div class="container">
    <div class="media">
        <div class="media-body">
            <h5 class="mt-0"><strong th:text="${article.getTitle()}" >Java开发</strong></h5>
            <p style="font-size: 9px;" th:text="${article.getCreated()}">发布于2003.11.6</p>
            <p th:text="${article.getContent()}">Java是一门面向对象的编程语言，不仅吸收了C++语言的各种优点，还摒弃了C++里难以理解的多继承、指针等概念，因此Java语言具有功能强大和简单易用两个特征。Java语言作为静态面向对象编程语言的代表，极好地实现了面向对象理论，允许程序员以优雅的思维方式进行复杂的编程
            </p>
        </div>
    </div>
</div>


<div class="container" style="padding: 22px;">
    <div class="media" th:each="comment:${comments}" >
        <img th:src="@{/imgs/评论.jpeg}" class="align-self-start mr-3" alt="..." height="30px">
        <div class="media-body" >
            <h5 class="mt-0"  th:text="${comment.getAuthor()}">李四</h5>
            <p th:text="${comment.getContent()}">文章排版不太好</p>
            <p style="font-size: 9px;"  th:text="${comment.getCreated()}">1991.11.9</p>
        </div>
    </div>
</div>

<div class="container">

    <!---写评论------>
    <form th:action="'/article/'+${article.getId()}+'/comment'" method="post">
        <div class="mb-3 mt-3">
            <label for="comment"  >请输入评论：</label>
            <textarea class="form-control" rows="5" id="comment" name="content" required></textarea>
        </div>
        <div class="mb-3">
            <label for="pwd" class="form-label">作者：</label>
            <input type="text" class="form-control" id="pwd" name="author" required>
        </div>
        <button type="submit" class="btn btn-primary">提交</button>
    </form>
</div>


<div th:replace="~{/client/end::header-end}"  ></div>
</body>
</html>